package com.example.tests;

import org.testng.Assert;
import org.testng.annotations.Test;
import com.example.fw.Contact;

public class ContactRemovalTest extends TestBase{
	
	@Test
	public void shouldDeleteFirstContact(){
		
		Contact contact1 = new Contact().setFirstName("1firstname").setLastName("1lastname");
		app.getContactHelper().createContact(contact1);
		Contact contact2 = new Contact().setFirstName("2firstname").setLastName("2lastname");
		app.getContactHelper().createContact(contact2);
		
		Contact deletedContact = app.getContactHelper().getFirstContact();
		app.getContactHelper().deleteContact();
		Contact firstContact = app.getContactHelper().getFirstContact();
		
		System.out.println("firstContact: " + firstContact);
		System.out.println("deletedContact: " + deletedContact);
		
		Assert.assertNotEquals(firstContact, deletedContact,"Test failed: <firstContact> equals <deletedContact>");
	}

}
